//#pragma once
//
//#include <atlcom.h>
//
//using namespace ATL;
//
//#pragma warning(push)			//Disable warning, C4189 : local variable is initialized but not referenced
//#pragma warning(disable: 4189)	//Because variable was used but used for assert only
//
//template <class T, const IID* piid, class CDV>
//LPUNKNOWN IConnectionPointImplEx<T, piid, CDV>::GetInterfaceAt(int nConnectionIndex)
//{
//	m_CPMTCritSec.Lock();
//
//	LPUNKNOWN pUnk = NULL;
//
//	DWORD dwGITCookie = (DWORD)(m_vec.GetAt(nConnectionIndex));
//	if (dwGITCookie != NULL)
//	{
//		IID iid;
//		GetConnectionInterface(&iid);
//		HRESULT hr = m_pGIT->GetInterfaceFromGlobal(dwGITCookie, iid, reinterpret_cast<void **>(&pUnk));
//		MNCASSERT(hr == S_OK);
//	}
//
//	m_CPMTCritSec.Unlock();
//
//	return pUnk;
//}
//
//#pragma warning(pop)
